import * as React from "react";
import { observer } from "mobx-react";
import { Row, Col, Menu } from "antd";
import { WeaInputNumber, WeaCheckbox, WeaSelect,WeaInput,WeaLocaleProvider } from "ecCom";
import HuobiFormatterStore from "../FormatterSettingDialog";
const getLabel = WeaLocaleProvider.getLabel;
export interface IHuobiFormatter {
    store: HuobiFormatterStore;
}
@observer
export default class HuobiFormatter extends React.Component<IHuobiFormatter, {}> {
    render() {
        const { store } = this.props;
        const { changeCustomFormatter,formatterValue, customType , onClickCustomType } = store;

        let selectCustomType = store.selectCustomType || getLabel('526910','G/通用格式');
        if(selectCustomType === 'General') {
            selectCustomType = getLabel('526910','G/通用格式');
        }
        return (
            <div>
                
               
                <Row ecId={`${this && this.props && this.props.ecId || ''}_Row@gk2mt5`} className="edcreport-formatter-common">
                    <label>{getLabel('526848','类型:') }</label>
                </Row>
                <Row ecId={`${this && this.props && this.props.ecId || ''}_Row@orh1e8`} className="edcreport-formatter-common">
                <WeaInput ecId={`${this && this.props && this.props.ecId || ''}_WeaInput@dd37eb`}
                    style={{ width: 300 }}
                    value={selectCustomType}
                    onChange={changeCustomFormatter}
                />
                </Row>
                <Row ecId={`${this && this.props && this.props.ecId || ''}_Row@2gtvq1`} className="edcreport-formatter-common">
                    <div className="edcreport-customtype-list-wrapper">
                        <Menu ecId={`${this && this.props && this.props.ecId || ''}_Menu@9ab5j4`}
                            onClick={onClickCustomType}
                            selectedKeys={[selectCustomType]}
                        >
                            {customType.map(menu => (
                                <Menu.Item ecId={`${this && this.props && this.props.ecId || ''}_undefined@cucz0i@${menu.key}`} key={menu.key} title={menu.showname} className="edc-report-valuetypeitem">
                                    <span >{menu.showname}</span>
                                </Menu.Item>
                            ))}
                        </Menu>
                    </div>
                </Row>
            </div>
        );
    }
}